package com.sws.worktive.jobs_fetcher;

import android.content.Context;

import com.android.volley.Request.Method;
import com.android.volley.toolbox.JsonObjectRequest;
import com.sws.worktive.job_service.BaseFetcher;
import com.sws.worktive.volley.MyVolley;

public class JobFetcher extends BaseFetcher{
	public static final String JOBS_URL = "http://www.worktive.com/api/index.php/jobs/33.924485/-84.013097/5/0/7dea6e8128c3c4120aa1016ded6aee9e";
	
	public JobFetcher(Context context){
		mContext = context;
	}
	
	public void fetchJobs(String requestTag, JobReceiverListener jobReceiverListener){
		JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(
				Method.GET, 
				JOBS_URL, 
				null, 
				createSuccessListener(jobReceiverListener), 
				createErrorListener(jobReceiverListener));
		MyVolley.getMyVolley(mContext).addToRequestQueue(jsonObjectRequest, requestTag);
	}
	
}
